package com.hspedu.properties_;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.Properties;

/**
 * @author LiuJinTao
 * @className Properties02
 * @date 2024/06/28 16:35
 * @description TODO
 */
public class Properties02 {
    public static void main(String[] args) throws IOException {
        Properties properties = new Properties();
        properties.load(new FileReader("src\\mysql.properties"));
        properties.list(System.out);
        String ip = properties.getProperty("ip");
        String user = properties.getProperty("user");
        System.out.println("ip=" + ip);
        System.out.println("user=" + user);
    }
}
